//
//  BaseViewController.m
//  礼物
//
//  Created by dllo on 15/11/4.
//  Copyright © 2015年 liangsicheng. All rights reserved.
//

#import "BaseViewController.h"
#import "DiscoveryViewController.h"

@interface BaseViewController ()

@end

@implementation BaseViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor=[UIColor whiteColor];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    self.navigationController.navigationBar.barTintColor =[UIColor colorWithRed:0.149 green:0.843 blue:0.643 alpha:0.680];
    // Dispose of any resources that can be recreated.
}
-(void)viewWillAppear:(BOOL)animated
{
    self.navigationController.navigationBar.barTintColor =[UIColor colorWithRed:0.149 green:0.843 blue:0.643 alpha:0.680];
    if ([self.class isSubclassOfClass:[DiscoveryViewController class]] ) {
        self.navigationController.navigationBar.translucent = NO;
    }else if ( [self.class isSubclassOfClass:[SearchViewController class]]){
        self.navigationController.navigationBar.translucent = NO;
        
    }
    
    else{
        self.navigationController.navigationBar.translucent = YES;
    }

}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
